package uitest 
{
	import flash.display.Sprite;
	import flash.utils.setTimeout;
	import iscript.uiFramework.components.container.Container;
	import iscript.uiFramework.components.layout.FlowLayout;
	import iscript.uiFramework.components.panel.Panel;
	import iscript.uiFramework.components.toolButton.*;
 
	public class PanelTest extends Sprite
	{
		
		public function PanelTest() 
		{
				 	var panel:Panel = new Panel(300, 300)
			
				panel.x = 650;
				panel.y = 100;
			 	//if (panel is ScrollBox) panel.scrollDrag = true;
				
			  	if(panel is Panel) panel.body.scrollDrag = true;
			//	panel.setLayout(new FlowLayout());	
				 for (var i:int = 0; i < 3; i++) {
						var t:* = new Sprite()
						
						if (i == 0) {
							t.x = 0
							t.y = 0	
							}
						if (i == 1) {
								t.x = 20
								t.y = 400	
							}
							if (i == 2) {
								t.x = 900
								t.y = 780	
							}
							//t.width = 200;
							//t.y = i * t.height; 
						//	panel.body.append(t);
				}
		
				 
				 var container:Container = new Container(800,400)
			 container.setLayout(new FlowLayout());
				 for (var j:int = 0; j < 120; j++) 
				 {
						container.getLayout().append(new MinButton());
						container.getLayout().append(new MaxButton());
						container.getLayout().append(new FindButton());
						container.getLayout().append(new SettingButton());
						container.getLayout().append(new RefreshButton());
						container.getLayout().append(new SaveButton());
						container.getLayout().append(new HelpButton()); 
						container.getLayout().append(new CloseButton());	 
				 }
				 	 
				 
				 
				     panel.body.append(container);
				 	 panel.render(this);
					 panel.border = true;
					 
					 
			/*		 setTimeout(function():void {
						 
						 	panel.hideHeader();
						 },2000)*/
		}
		
		
		
		
	}

}